package com.linlong.linlongchat.mapper;

import com.linlong.linlongchat.domain.po.Message;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 华少
 * @since 2024-09-20
 */
public interface MessageMapper extends BaseMapper<Message> {
    @Update("UPDATE message SET status = 1, update_time = NOW() WHERE record_id = #{recordId} AND receive_account = #{receiveAccount} AND status = 0")
    void updateStatusByRecordId(@Param("recordId") Integer recordId, @Param("receiveAccount") String receiveAccount);
}
